
class MyThread extends Thread {
    @Override
    public void run() {
        while (true) {
            System.out.println("第二个线程22222");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
public class Test {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new MyThread();
        //thread.start();
        thread.run();
        while (true) {
            System.out.println("主线程11111");
            Thread.sleep(1000);
        }
    }
}
